﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PhanQuyenUser.aspx.cs"
    Inherits="QuangMobile.Admin.PhanQuyenUser" MasterPageFile="~/Admin/AdminSite.Master" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div class="NoiDungChinh">
        <img class="FormImage" src="images/computer.png" />
        <p class="FormTitle">
            Phân quyền người dùng</p>
    </div>
    <div class="FormMain">
        <div class="Form View">
            <asp:GridView ID="grdDanhMuc" runat="server" AutoGenerateColumns="False" CssClass="ListTable"
                DataKeyNames="ID" OnRowCommand="grdDanhMuc_RowCommand" 
                onrowcancelingedit="grdDanhMuc_RowCancelingEdit" 
                onrowediting="grdDanhMuc_RowEditing">
                <Columns>
                    <asp:TemplateField HeaderText="STT">
                        <ItemTemplate>
                            <asp:Label ID="lblIDDM" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="UserName">
                        <ItemTemplate>
                            <asp:Label ID="lblUserName" runat="server" Text='<%# Eval("Username") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Họ tên">
                        <ItemTemplate>
                            <asp:Label ID="lblHoTen" runat="server" Text='<%# Eval("HoTen") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quyền Admin">
                        <ItemTemplate>
                            <asp:Image ID="imgAdmin" runat="server" src='<%# Eval("IsAdmin").ToString().Equals("True") ? "images/ok.png" : "images/cancel.png" %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                        <EditItemTemplate>
                            <asp:CheckBox ID="chkAdmin" runat="server" Checked='<%# Eval("IsAdmin")%>'/>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quyền đăng bài">
                        <ItemTemplate>
                            <asp:Image ID="imgPost" runat="server" src='<%# Eval("IsPost").ToString().Equals("True") ? "images/ok.png" : "images/cancel.png" %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                        <EditItemTemplate>
                            <asp:CheckBox ID="chkPost" runat="server" Checked='<%# Eval("IsPost")%>'/>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quyền sửa bài">
                        <ItemTemplate>
                            <asp:Image ID="imgApprove" runat="server" src='<%# Eval("IsApprove").ToString().Equals("True") ? "images/ok.png" : "images/cancel.png" %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                        <EditItemTemplate>
                            <asp:CheckBox ID="chkApprove" runat="server" Checked='<%# Eval("IsApprove")%>'/>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Sửa">
                    <HeaderStyle Wrap="False"></HeaderStyle>
                    <ItemStyle Wrap="False" Width="60px"></ItemStyle>
                    <ItemTemplate>
                        <asp:ImageButton ID="imgEdit" runat="server" ImageUrl="../images/edit.gif" ToolTip="Sửa"
                            CommandArgument='<%# Eval("ID")%>' CommandName="Edit"></asp:ImageButton>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:ImageButton ID="imgUpdate" runat="server" ImageUrl="../images/approval.png"
                            ToolTip="Cập nhật" CommandArgument='<%# Eval("ID")%>' CommandName="<%# QuangMobile.MyConst.Action.Approve %>">
                        </asp:ImageButton>
                        <asp:ImageButton ID="imgCancel" runat="server" CommandName="Cancel" ImageUrl="../images/cancel.png"
                            CommandArgument='<%# Eval("ID") %>' />
                    </EditItemTemplate>
                    <ItemStyle Width="70px"></ItemStyle>
                </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
</asp:Content>
